namespace QMVnSoft.Invoices
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.Controls.ChildGridControls;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormCTTPViewer : FormHistoryViewer
    {
        private DataGridViewTextBoxColumn Column10;
        private OptionColumn Column11;
        private SearchColumn Column12;
        private SearchColumn Column13;
        private SearchColumn Column14;
        private SearchColumn Column16;
        private SearchColumn Column17;
        private DateColumn Column18;
        private NumericColumn Column19;
        private NumericColumn Column20;
        private NumericColumn Column21;
        private NumericColumn Column22;
        private NumericColumn Column23;
        private NumericColumn Column24;
        private SearchColumn Column9;
        private IContainer components;
        private GridDetail grdDetail;
        private LabelControl lblDesc_EN;
        private LabelControl lblDien_Giai;
        private LabelControl lblGhi_Chu;
        private LabelControl lblMa_Bp;
        private LabelControl lblMa_Hd;
        private LabelControl lblMa_NN;
        private LabelControl lblMa_YC;
        private LabelControl lblTTien_Nt;
        private CTTPDataAccess oMethod = new CTTPDataAccess();
        private TextControl txtDesc_EN;
        private TextControl txtDien_Giai;
        private TextControl txtGhi_Chu;
        private TextSearch txtMa_Bp;
        private TextSearch txtMa_Hd;
        private TextSearch txtMa_NN;
        private TextSearch txtMa_YC;
        private TextControl txtTen_Bp;
        private TextControl txtTen_Hd;
        private TextControl txtTen_NN;
        private TextControl txtTen_YC;
        private TextNumeric txtTTien_Nt;

        public FormCTTPViewer()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCTTPViewer));
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
            this.txtDesc_EN = new QMVnSoft.Controls.TextControl();
            this.txtDien_Giai = new QMVnSoft.Controls.TextControl();
            this.txtTen_Hd = new QMVnSoft.Controls.TextControl();
            this.txtTen_Bp = new QMVnSoft.Controls.TextControl();
            this.lblDesc_EN = new QMVnSoft.Controls.LabelControl();
            this.lblDien_Giai = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Hd = new QMVnSoft.Controls.TextSearch();
            this.lblMa_Hd = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Bp = new QMVnSoft.Controls.TextSearch();
            this.lblMa_Bp = new QMVnSoft.Controls.LabelControl();
            this.txtTTien_Nt = new QMVnSoft.Controls.TextNumeric();
            this.lblTTien_Nt = new QMVnSoft.Controls.LabelControl();
            this.lblGhi_Chu = new QMVnSoft.Controls.LabelControl();
            this.grdDetail = new QMVnSoft.Controls.GridDetail();
            this.Column9 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column11 = new QMVnSoft.Controls.ChildGridControls.OptionColumn();
            this.Column16 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column12 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column13 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column14 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column17 = new QMVnSoft.Controls.ChildGridControls.SearchColumn();
            this.Column18 = new QMVnSoft.Controls.ChildGridControls.DateColumn();
            this.Column19 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column20 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column21 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column22 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column23 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column24 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.txtGhi_Chu = new QMVnSoft.Controls.TextControl();
            this.txtTen_NN = new QMVnSoft.Controls.TextControl();
            this.txtTen_YC = new QMVnSoft.Controls.TextControl();
            this.txtMa_NN = new QMVnSoft.Controls.TextSearch();
            this.txtMa_YC = new QMVnSoft.Controls.TextSearch();
            this.lblMa_NN = new QMVnSoft.Controls.LabelControl();
            this.lblMa_YC = new QMVnSoft.Controls.LabelControl();
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).BeginInit();
            this.SuspendLayout();
            // 
            // lblPhan_Loai
            // 
            this.lblPhan_Loai.Location = new System.Drawing.Point(12, 514);
            // 
            // txtMa_Loai1
            // 
            this.txtMa_Loai1.Location = new System.Drawing.Point(99, 511);
            this.txtMa_Loai1.TabIndex = 13;
            // 
            // txtMa_Loai2
            // 
            this.txtMa_Loai2.Location = new System.Drawing.Point(327, 511);
            this.txtMa_Loai2.TabIndex = 14;
            // 
            // txtMa_Loai3
            // 
            this.txtMa_Loai3.Location = new System.Drawing.Point(555, 511);
            this.txtMa_Loai3.TabIndex = 15;
            // 
            // txtNgay_Ct
            // 
            this.txtNgay_Ct.TabIndex = 1;
            // 
            // txtNgay_Ps
            // 
            this.txtNgay_Ps.TabIndex = 0;
            // 
            // txtSo_Ct
            // 
            this.txtSo_Ct.TabIndex = 2;
            // 
            // txtDesc_EN
            // 
            this.txtDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDesc_EN.CheckTextSearched = false;
            this.txtDesc_EN.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDesc_EN.Location = new System.Drawing.Point(487, 133);
            this.txtDesc_EN.MaxLength = 254;
            this.txtDesc_EN.Name = "txtDesc_EN";
            this.txtDesc_EN.OldValue = null;
            this.txtDesc_EN.ReadOnly = true;
            this.txtDesc_EN.Size = new System.Drawing.Size(295, 20);
            this.txtDesc_EN.TabIndex = 10;
            this.txtDesc_EN.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDesc_EN.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDesc_EN.Value = ((object)(resources.GetObject("txtDesc_EN.Value")));
            // 
            // txtDien_Giai
            // 
            this.txtDien_Giai.CheckTextSearched = false;
            this.txtDien_Giai.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDien_Giai.Location = new System.Drawing.Point(99, 133);
            this.txtDien_Giai.MaxLength = 254;
            this.txtDien_Giai.Name = "txtDien_Giai";
            this.txtDien_Giai.OldValue = null;
            this.txtDien_Giai.ReadOnly = true;
            this.txtDien_Giai.Size = new System.Drawing.Size(296, 20);
            this.txtDien_Giai.TabIndex = 9;
            this.txtDien_Giai.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDien_Giai.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDien_Giai.Value = ((object)(resources.GetObject("txtDien_Giai.Value")));
            // 
            // txtTen_Hd
            // 
            this.txtTen_Hd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Hd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Hd.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Hd.CheckTextSearched = false;
            this.txtTen_Hd.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Hd.Enabled = false;
            this.txtTen_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Hd.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Hd.Location = new System.Drawing.Point(223, 115);
            this.txtTen_Hd.Name = "txtTen_Hd";
            this.txtTen_Hd.OldValue = null;
            this.txtTen_Hd.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Hd.TabIndex = 86;
            this.txtTen_Hd.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Hd.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Hd.Value = ((object)(resources.GetObject("txtTen_Hd.Value")));
            // 
            // txtTen_Bp
            // 
            this.txtTen_Bp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Bp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Bp.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Bp.CheckTextSearched = false;
            this.txtTen_Bp.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Bp.Enabled = false;
            this.txtTen_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Bp.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Bp.Location = new System.Drawing.Point(223, 94);
            this.txtTen_Bp.Name = "txtTen_Bp";
            this.txtTen_Bp.OldValue = null;
            this.txtTen_Bp.Size = new System.Drawing.Size(559, 13);
            this.txtTen_Bp.TabIndex = 87;
            this.txtTen_Bp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Bp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Bp.Value = ((object)(resources.GetObject("txtTen_Bp.Value")));
            // 
            // lblDesc_EN
            // 
            this.lblDesc_EN.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblDesc_EN.AutoSize = true;
            this.lblDesc_EN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDesc_EN.Location = new System.Drawing.Point(410, 136);
            this.lblDesc_EN.Name = "lblDesc_EN";
            this.lblDesc_EN.Size = new System.Drawing.Size(71, 14);
            this.lblDesc_EN.TabIndex = 80;
            this.lblDesc_EN.Text = "Diễn giải (EN)";
            // 
            // lblDien_Giai
            // 
            this.lblDien_Giai.AutoSize = true;
            this.lblDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDien_Giai.Location = new System.Drawing.Point(12, 136);
            this.lblDien_Giai.Name = "lblDien_Giai";
            this.lblDien_Giai.Size = new System.Drawing.Size(73, 14);
            this.lblDien_Giai.TabIndex = 81;
            this.lblDien_Giai.Text = "Diễn giải (VN)";
            // 
            // txtMa_Hd
            // 
            this.txtMa_Hd.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Hd.CheckTextSearched = false;
            this.txtMa_Hd.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Hd.EmptyIsValid = true;
            this.txtMa_Hd.FieldDisplay = "Ten_Hd";
            this.txtMa_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Hd.FoundIsValid = true;
            this.txtMa_Hd.Location = new System.Drawing.Point(99, 112);
            this.txtMa_Hd.MaxLength = 32;
            this.txtMa_Hd.Name = "txtMa_Hd";
            this.txtMa_Hd.OldValue = null;
            this.txtMa_Hd.ReadOnly = true;
            this.txtMa_Hd.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Hd.TabIndex = 8;
            this.txtMa_Hd.TableName = "DMHD";
            this.txtMa_Hd.TextDisplay = this.txtTen_Hd;
            this.txtMa_Hd.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Hd.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Hd.Value = ((object)(resources.GetObject("txtMa_Hd.Value")));
            // 
            // lblMa_Hd
            // 
            this.lblMa_Hd.AutoSize = true;
            this.lblMa_Hd.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Hd.Location = new System.Drawing.Point(12, 115);
            this.lblMa_Hd.Name = "lblMa_Hd";
            this.lblMa_Hd.Size = new System.Drawing.Size(54, 14);
            this.lblMa_Hd.TabIndex = 82;
            this.lblMa_Hd.Text = "Hợp đồng";
            // 
            // txtMa_Bp
            // 
            this.txtMa_Bp.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Bp.CheckTextSearched = false;
            this.txtMa_Bp.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Bp.EmptyIsValid = true;
            this.txtMa_Bp.FieldDisplay = "Ten_Bp";
            this.txtMa_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Bp.FoundIsValid = true;
            this.txtMa_Bp.Location = new System.Drawing.Point(99, 91);
            this.txtMa_Bp.MaxLength = 32;
            this.txtMa_Bp.Name = "txtMa_Bp";
            this.txtMa_Bp.OldValue = null;
            this.txtMa_Bp.ReadOnly = true;
            this.txtMa_Bp.Size = new System.Drawing.Size(118, 20);
            this.txtMa_Bp.TabIndex = 7;
            this.txtMa_Bp.TableName = "DMBP";
            this.txtMa_Bp.TextDisplay = this.txtTen_Bp;
            this.txtMa_Bp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Bp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Bp.Value = ((object)(resources.GetObject("txtMa_Bp.Value")));
            // 
            // lblMa_Bp
            // 
            this.lblMa_Bp.AutoSize = true;
            this.lblMa_Bp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Bp.Location = new System.Drawing.Point(12, 94);
            this.lblMa_Bp.Name = "lblMa_Bp";
            this.lblMa_Bp.Size = new System.Drawing.Size(47, 14);
            this.lblMa_Bp.TabIndex = 83;
            this.lblMa_Bp.Text = "Bộ phận";
            // 
            // txtTTien_Nt
            // 
            this.txtTTien_Nt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTTien_Nt.BackColor = System.Drawing.Color.White;
            this.txtTTien_Nt.Enabled = false;
            this.txtTTien_Nt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTTien_Nt.ForeColor = System.Drawing.Color.Black;
            this.txtTTien_Nt.Location = new System.Drawing.Point(674, 490);
            this.txtTTien_Nt.Name = "txtTTien_Nt";
            this.txtTTien_Nt.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTTien_Nt.OldValue = null;
            this.txtTTien_Nt.Size = new System.Drawing.Size(108, 20);
            this.txtTTien_Nt.TabIndex = 29;
            this.txtTTien_Nt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTTien_Nt.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTTien_Nt.Value = ((object)(resources.GetObject("txtTTien_Nt.Value")));
            // 
            // lblTTien_Nt
            // 
            this.lblTTien_Nt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.lblTTien_Nt.AutoSize = true;
            this.lblTTien_Nt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTTien_Nt.Location = new System.Drawing.Point(617, 493);
            this.lblTTien_Nt.Name = "lblTTien_Nt";
            this.lblTTien_Nt.Size = new System.Drawing.Size(51, 14);
            this.lblTTien_Nt.TabIndex = 101;
            this.lblTTien_Nt.Text = "Tổng tiền";
            // 
            // lblGhi_Chu
            // 
            this.lblGhi_Chu.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblGhi_Chu.AutoSize = true;
            this.lblGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblGhi_Chu.Location = new System.Drawing.Point(12, 493);
            this.lblGhi_Chu.Name = "lblGhi_Chu";
            this.lblGhi_Chu.Size = new System.Drawing.Size(44, 14);
            this.lblGhi_Chu.TabIndex = 99;
            this.lblGhi_Chu.Text = "Ghi chú";
            // 
            // grdDetail
            // 
            this.grdDetail.AllowUserToAddRows = false;
            this.grdDetail.AllowUserToDeleteRows = false;
            this.grdDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.grdDetail.CheckAutoSize = true;
            this.grdDetail.CheckColor = false;
            this.grdDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.grdDetail.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column9,
            this.Column10,
            this.Column11,
            this.Column16,
            this.Column12,
            this.Column13,
            this.Column14,
            this.Column17,
            this.Column18,
            this.Column19,
            this.Column20,
            this.Column21,
            this.Column22,
            this.Column23,
            this.Column24});
            this.grdDetail.Font = new System.Drawing.Font("Arial", 8.25F);
            this.grdDetail.Location = new System.Drawing.Point(0, 159);
            this.grdDetail.Name = "grdDetail";
            this.grdDetail.Size = new System.Drawing.Size(794, 325);
            this.grdDetail.TabIndex = 11;
            // 
            // Column9
            // 
            this.Column9.DataPropertyName = "Ma_Vt";
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column9.DefaultCellStyle = dataGridViewCellStyle1;
            this.Column9.DestinationFields = "Ten_Vt, Dvt";
            this.Column9.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column9.EmptyIsValid = true;
            this.Column9.HeaderText = "Mã vật tư";
            this.Column9.Name = "Column9";
            this.Column9.ReadOnly = true;
            this.Column9.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column9.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column9.SourceFields = "Ten_Vt, Dvt";
            this.Column9.TableName = "DMVT";
            this.Column9.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column9.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column9.Width = 50;
            // 
            // Column10
            // 
            this.Column10.DataPropertyName = "Ten_Vt";
            this.Column10.HeaderText = "Tên vật tư";
            this.Column10.Name = "Column10";
            this.Column10.ReadOnly = true;
            this.Column10.Width = 139;
            // 
            // Column11
            // 
            this.Column11.DataPropertyName = "Dvt";
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column11.DefaultCellStyle = dataGridViewCellStyle2;
            this.Column11.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column11.HeaderText = "Đvt";
            this.Column11.Name = "Column11";
            this.Column11.ReadOnly = true;
            this.Column11.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column11.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column11.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.Column11.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column11.Width = 25;
            // 
            // Column16
            // 
            this.Column16.DataPropertyName = "Ma_Sp";
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column16.DefaultCellStyle = dataGridViewCellStyle3;
            this.Column16.DestinationFields = "Ten_Sp";
            this.Column16.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column16.EmptyIsValid = true;
            this.Column16.HeaderText = "Sản phẩm";
            this.Column16.Name = "Column16";
            this.Column16.ReadOnly = true;
            this.Column16.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column16.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column16.SourceFields = "Ten_Sp";
            this.Column16.TableName = "DMSP";
            this.Column16.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column16.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column16.Width = 50;
            // 
            // Column12
            // 
            this.Column12.DataPropertyName = "Ma_Yt";
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column12.DefaultCellStyle = dataGridViewCellStyle4;
            this.Column12.DestinationFields = "Ten_Yt";
            this.Column12.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column12.HeaderText = "Yếu tố";
            this.Column12.Name = "Column12";
            this.Column12.ReadOnly = true;
            this.Column12.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column12.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column12.SourceFields = "Ten_Yt";
            this.Column12.TableName = "DMYT";
            this.Column12.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column12.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column12.Width = 50;
            // 
            // Column13
            // 
            this.Column13.DataPropertyName = "Ma_Bp";
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column13.DefaultCellStyle = dataGridViewCellStyle5;
            this.Column13.DestinationFields = "Ten_Bp";
            this.Column13.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column13.EmptyIsValid = true;
            this.Column13.HeaderText = "Bộ phận";
            this.Column13.Name = "Column13";
            this.Column13.ReadOnly = true;
            this.Column13.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column13.SourceFields = "Ten_Bp";
            this.Column13.TableName = "DMBP";
            this.Column13.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column13.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column13.Width = 50;
            // 
            // Column14
            // 
            this.Column14.DataPropertyName = "Ma_Hd";
            dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column14.DefaultCellStyle = dataGridViewCellStyle6;
            this.Column14.DestinationFields = "Ten_Hd";
            this.Column14.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column14.EmptyIsValid = true;
            this.Column14.HeaderText = "Hợp đồng";
            this.Column14.Name = "Column14";
            this.Column14.ReadOnly = true;
            this.Column14.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column14.SourceFields = "Ten_Hd";
            this.Column14.TableName = "DMHD";
            this.Column14.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column14.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column14.Width = 50;
            // 
            // Column17
            // 
            this.Column17.DataPropertyName = "Lo_Hang";
            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column17.DefaultCellStyle = dataGridViewCellStyle7;
            this.Column17.DisabledForeColor = System.Drawing.Color.Blue;
            this.Column17.EmptyIsValid = true;
            this.Column17.HeaderText = "Lô hàng";
            this.Column17.Name = "Column17";
            this.Column17.ReadOnly = true;
            this.Column17.Resizable = System.Windows.Forms.DataGridViewTriState.True;
            this.Column17.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column17.TableName = "LOHANG";
            this.Column17.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.Column17.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.Column17.Width = 50;
            // 
            // Column18
            // 
            this.Column18.DataPropertyName = "Han_Dung";
            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column18.DefaultCellStyle = dataGridViewCellStyle8;
            this.Column18.HeaderText = "Hạn dùng";
            this.Column18.Name = "Column18";
            this.Column18.ReadOnly = true;
            this.Column18.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column18.Width = 62;
            // 
            // Column19
            // 
            this.Column19.DataPropertyName = "H_Luong";
            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column19.DefaultCellStyle = dataGridViewCellStyle9;
            this.Column19.HeaderText = "Hàm lượng";
            this.Column19.Name = "Column19";
            this.Column19.ReadOnly = true;
            this.Column19.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column19.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column19.Width = 20;
            // 
            // Column20
            // 
            this.Column20.DataPropertyName = "Do_Am_PT";
            dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column20.DefaultCellStyle = dataGridViewCellStyle10;
            this.Column20.HeaderText = "Độ ẩm";
            this.Column20.Name = "Column20";
            this.Column20.ReadOnly = true;
            this.Column20.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column20.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column20.Width = 20;
            // 
            // Column21
            // 
            this.Column21.DataPropertyName = "Do_Con_PT";
            dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column21.DefaultCellStyle = dataGridViewCellStyle11;
            this.Column21.HeaderText = "Độ cồn";
            this.Column21.Name = "Column21";
            this.Column21.ReadOnly = true;
            this.Column21.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column21.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.Column21.Width = 20;
            // 
            // Column22
            // 
            this.Column22.DataPropertyName = "So_Luong9";
            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column22.DefaultCellStyle = dataGridViewCellStyle12;
            this.Column22.HeaderText = "Số lượng";
            this.Column22.Name = "Column22";
            this.Column22.ReadOnly = true;
            this.Column22.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column22.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Quantity;
            this.Column22.Width = 50;
            this.Column22.ZeroIsValid = true;
            // 
            // Column23
            // 
            this.Column23.DataPropertyName = "Gia9";
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column23.DefaultCellStyle = dataGridViewCellStyle13;
            this.Column23.HeaderText = "Đơn giá";
            this.Column23.Name = "Column23";
            this.Column23.ReadOnly = true;
            this.Column23.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column23.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ForeignPrice;
            this.Column23.Width = 55;
            this.Column23.ZeroIsValid = true;
            // 
            // Column24
            // 
            this.Column24.DataPropertyName = "Tien_Nt";
            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column24.DefaultCellStyle = dataGridViewCellStyle14;
            this.Column24.HeaderText = "Thành tiền";
            this.Column24.Name = "Column24";
            this.Column24.ReadOnly = true;
            this.Column24.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column24.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.ForeignAmount;
            this.Column24.Width = 60;
            this.Column24.ZeroIsValid = true;
            // 
            // txtGhi_Chu
            // 
            this.txtGhi_Chu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtGhi_Chu.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtGhi_Chu.CheckTextSearched = false;
            this.txtGhi_Chu.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtGhi_Chu.Location = new System.Drawing.Point(99, 490);
            this.txtGhi_Chu.MaxLength = 254;
            this.txtGhi_Chu.Name = "txtGhi_Chu";
            this.txtGhi_Chu.OldValue = null;
            this.txtGhi_Chu.ReadOnly = true;
            this.txtGhi_Chu.Size = new System.Drawing.Size(455, 20);
            this.txtGhi_Chu.TabIndex = 12;
            this.txtGhi_Chu.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtGhi_Chu.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtGhi_Chu.Value = ((object)(resources.GetObject("txtGhi_Chu.Value")));
            // 
            // txtTen_NN
            // 
            this.txtTen_NN.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_NN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_NN.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_NN.CheckTextSearched = false;
            this.txtTen_NN.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_NN.Enabled = false;
            this.txtTen_NN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_NN.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_NN.Location = new System.Drawing.Point(223, 73);
            this.txtTen_NN.Name = "txtTen_NN";
            this.txtTen_NN.OldValue = null;
            this.txtTen_NN.Size = new System.Drawing.Size(559, 13);
            this.txtTen_NN.TabIndex = 106;
            this.txtTen_NN.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_NN.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_NN.Value = ((object)(resources.GetObject("txtTen_NN.Value")));
            // 
            // txtTen_YC
            // 
            this.txtTen_YC.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_YC.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_YC.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_YC.CheckTextSearched = false;
            this.txtTen_YC.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_YC.Enabled = false;
            this.txtTen_YC.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_YC.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_YC.Location = new System.Drawing.Point(223, 52);
            this.txtTen_YC.Name = "txtTen_YC";
            this.txtTen_YC.OldValue = null;
            this.txtTen_YC.Size = new System.Drawing.Size(559, 13);
            this.txtTen_YC.TabIndex = 107;
            this.txtTen_YC.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_YC.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_YC.Value = ((object)(resources.GetObject("txtTen_YC.Value")));
            // 
            // txtMa_NN
            // 
            this.txtMa_NN.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_NN.CheckTextSearched = false;
            this.txtMa_NN.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_NN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_NN.Location = new System.Drawing.Point(99, 70);
            this.txtMa_NN.MaxLength = 32;
            this.txtMa_NN.Name = "txtMa_NN";
            this.txtMa_NN.OldValue = null;
            this.txtMa_NN.ReadOnly = true;
            this.txtMa_NN.Size = new System.Drawing.Size(118, 20);
            this.txtMa_NN.TabIndex = 6;
            this.txtMa_NN.TableName = "";
            this.txtMa_NN.TextDisplay = this.txtTen_NN;
            this.txtMa_NN.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_NN.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_NN.Value = ((object)(resources.GetObject("txtMa_NN.Value")));
            // 
            // txtMa_YC
            // 
            this.txtMa_YC.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_YC.CheckTextSearched = false;
            this.txtMa_YC.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_YC.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_YC.Location = new System.Drawing.Point(99, 49);
            this.txtMa_YC.MaxLength = 32;
            this.txtMa_YC.Name = "txtMa_YC";
            this.txtMa_YC.OldValue = null;
            this.txtMa_YC.ReadOnly = true;
            this.txtMa_YC.Size = new System.Drawing.Size(118, 20);
            this.txtMa_YC.TabIndex = 5;
            this.txtMa_YC.TableName = "";
            this.txtMa_YC.TextDisplay = this.txtTen_YC;
            this.txtMa_YC.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_YC.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_YC.Value = ((object)(resources.GetObject("txtMa_YC.Value")));
            // 
            // lblMa_NN
            // 
            this.lblMa_NN.AutoSize = true;
            this.lblMa_NN.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_NN.Location = new System.Drawing.Point(12, 73);
            this.lblMa_NN.Name = "lblMa_NN";
            this.lblMa_NN.Size = new System.Drawing.Size(63, 14);
            this.lblMa_NN.TabIndex = 105;
            this.lblMa_NN.Text = "Người nhận";
            // 
            // lblMa_YC
            // 
            this.lblMa_YC.AutoSize = true;
            this.lblMa_YC.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_YC.Location = new System.Drawing.Point(12, 52);
            this.lblMa_YC.Name = "lblMa_YC";
            this.lblMa_YC.Size = new System.Drawing.Size(78, 14);
            this.lblMa_YC.TabIndex = 104;
            this.lblMa_YC.Text = "Người yêu cầu";
            // 
            // FormCTTPViewer
            // 
            this.ClientSize = new System.Drawing.Size(794, 534);
            this.Controls.Add(this.txtTen_NN);
            this.Controls.Add(this.txtTen_YC);
            this.Controls.Add(this.txtMa_NN);
            this.Controls.Add(this.txtMa_YC);
            this.Controls.Add(this.lblMa_NN);
            this.Controls.Add(this.lblMa_YC);
            this.Controls.Add(this.txtTTien_Nt);
            this.Controls.Add(this.lblTTien_Nt);
            this.Controls.Add(this.lblGhi_Chu);
            this.Controls.Add(this.txtDesc_EN);
            this.Controls.Add(this.txtDien_Giai);
            this.Controls.Add(this.txtTen_Hd);
            this.Controls.Add(this.txtTen_Bp);
            this.Controls.Add(this.lblDesc_EN);
            this.Controls.Add(this.lblDien_Giai);
            this.Controls.Add(this.txtGhi_Chu);
            this.Controls.Add(this.txtMa_Hd);
            this.Controls.Add(this.lblMa_Hd);
            this.Controls.Add(this.txtMa_Bp);
            this.Controls.Add(this.lblMa_Bp);
            this.Controls.Add(this.grdDetail);
            this.Name = "FormCTTPViewer";
            this.Controls.SetChildIndex(this.grdDetail, 0);
            this.Controls.SetChildIndex(this.lblPhan_Loai, 0);
            this.Controls.SetChildIndex(this.txtSo_Ct, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ps, 0);
            this.Controls.SetChildIndex(this.txtNgay_Ct, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai1, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai2, 0);
            this.Controls.SetChildIndex(this.txtMa_Loai3, 0);
            this.Controls.SetChildIndex(this.lblMa_Bp, 0);
            this.Controls.SetChildIndex(this.txtMa_Bp, 0);
            this.Controls.SetChildIndex(this.lblMa_Hd, 0);
            this.Controls.SetChildIndex(this.txtMa_Hd, 0);
            this.Controls.SetChildIndex(this.txtGhi_Chu, 0);
            this.Controls.SetChildIndex(this.lblDien_Giai, 0);
            this.Controls.SetChildIndex(this.lblDesc_EN, 0);
            this.Controls.SetChildIndex(this.txtTen_Bp, 0);
            this.Controls.SetChildIndex(this.txtTen_Hd, 0);
            this.Controls.SetChildIndex(this.txtDien_Giai, 0);
            this.Controls.SetChildIndex(this.txtDesc_EN, 0);
            this.Controls.SetChildIndex(this.lblGhi_Chu, 0);
            this.Controls.SetChildIndex(this.lblTTien_Nt, 0);
            this.Controls.SetChildIndex(this.txtTTien_Nt, 0);
            this.Controls.SetChildIndex(this.lblMa_YC, 0);
            this.Controls.SetChildIndex(this.lblMa_NN, 0);
            this.Controls.SetChildIndex(this.txtMa_YC, 0);
            this.Controls.SetChildIndex(this.txtMa_NN, 0);
            this.Controls.SetChildIndex(this.txtTen_YC, 0);
            this.Controls.SetChildIndex(this.txtTen_NN, 0);
            ((System.ComponentModel.ISupportInitialize)(this.grdDetail)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        internal override void OnResetControls()
        {
            base.DetailGridBrowser = this.grdDetail;
            int num = 0;
            if (base.AppInvoiceParameters.AllowDepartmentControl != 1)
            {
                num += this.txtMa_Hd.Top - this.txtMa_Bp.Top;
                this.lblMa_Bp.Visible = false;
                this.txtMa_Bp.Visible = false;
                this.txtTen_Bp.Visible = false;
            }
            if (base.AppInvoiceParameters.AllowContractControl != 1)
            {
                num += this.txtDien_Giai.Top - this.txtMa_Hd.Top;
                this.lblMa_Hd.Visible = false;
                this.txtMa_Hd.Visible = false;
                this.txtTen_Hd.Visible = false;
            }
            if (num != 0)
            {
                if (base.AppInvoiceParameters.AllowContractControl == 1)
                {
                    this.lblMa_Hd.Top -= num;
                    this.txtMa_Hd.Top -= num;
                    this.txtTen_Hd.Top -= num;
                }
                this.lblDien_Giai.Top -= num;
                this.txtDien_Giai.Top -= num;
                this.lblDesc_EN.Top -= num;
                this.txtDesc_EN.Top -= num;
                this.grdDetail.Top -= num;
                this.grdDetail.Height += num;
            }
            if (!base.AppInvoiceParameters.BilingualUsed)
            {
                this.lblDesc_EN.Visible = false;
                this.txtDesc_EN.Visible = false;
                this.txtDien_Giai.Width = (this.txtDesc_EN.Left + this.txtDesc_EN.Width) - this.txtDien_Giai.Left;
                this.txtDien_Giai.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            }
            if (base.AppInvoiceParameters.AllowDepartmentControl != 2)
            {
                base.DetailGridBrowser.Columns[5].Visible = false;
            }
            if (base.AppInvoiceParameters.AllowContractControl != 2)
            {
                base.DetailGridBrowser.Columns[6].Visible = false;
            }
            if (!AppInstance.LotNumberCtrl)
            {
                base.DetailGridBrowser.Columns[7].Visible = false;
            }
            if (!AppInstance.DeadLineCtrl)
            {
                base.DetailGridBrowser.Columns[8].Visible = false;
            }
            if (!AppInstance.QualityCtrl)
            {
                base.DetailGridBrowser.Columns[9].Visible = false;
            }
            if (!AppInstance.DampCtrl)
            {
                base.DetailGridBrowser.Columns[10].Visible = false;
            }
            if (!AppInstance.AlcoholCtrl)
            {
                base.DetailGridBrowser.Columns[11].Visible = false;
            }
            if (base.AppInvoiceParameters.FreeFields <= 0)
            {
                num = base.txtMa_Loai1.Top - this.txtGhi_Chu.Top;
                this.lblGhi_Chu.Top += num;
                this.txtGhi_Chu.Top += num;
                this.lblTTien_Nt.Top += num;
                this.txtTTien_Nt.Top += num;
                this.grdDetail.Height += num;
            }
            base.OnResetControls();
        }

        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);
            if (((this.txtDien_Giai != null) && (base.AppInvoiceParameters != null)) && base.AppInvoiceParameters.BilingualUsed)
            {
                int num = base.ClientSize.Width - 0xcb;
                this.txtDien_Giai.Width = num / 2;
                this.txtDesc_EN.Left = (this.txtDien_Giai.Left + this.txtDien_Giai.Width) + 0x5c;
                this.txtDesc_EN.Width = num - this.txtDien_Giai.Width;
                this.lblDesc_EN.Left = (this.txtDesc_EN.Left - this.lblDesc_EN.Width) - 6;
            }
        }

        internal override void OnShow()
        {
            base.OnShow();
            this.txtMa_YC.Value = base.LocalMasterRow["Ma_YC"];
            this.txtTen_YC.Value = base.LocalMasterRow["Ten_YC"];
            this.txtMa_NN.Value = base.LocalMasterRow["Ma_NN"];
            this.txtTen_NN.Value = base.LocalMasterRow["Ten_NN"];
            this.txtMa_Bp.Value = base.LocalMasterRow["Ma_Bp"];
            this.txtTen_Bp.Value = base.LocalMasterRow["Ten_Bp"];
            this.txtMa_Hd.Value = base.LocalMasterRow["Ma_Hd"];
            this.txtTen_Hd.Value = base.LocalMasterRow["Ten_Hd"];
            this.txtDien_Giai.Value = base.LocalMasterRow["Dien_Giai"];
            this.txtDesc_EN.Value = base.LocalMasterRow["Desc_EN"];
            this.txtGhi_Chu.Value = base.LocalMasterRow["Ghi_Chu"];
            this.txtTTien_Nt.Value = base.LocalMasterRow["TTien0"];
        }
    }
}

